import request from '../request'
import globalConfig from "../config";
import {praseStrEmpty} from '@/common/utils'

// 查询用户列表
export function requestLogin(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.vblog.info}`,
        method: 'get',
        params: data
    })
}

// 查询用户信息
export function articleList(params) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.vblog.articleList}`,
        method: 'get',
        params: params
    })
}


// 新增用户
export function saveArticle(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.vblog.saveArticle}`,
        method: 'post',
        data: data
    })
}

// 更新用户信息
export function updateArticle(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.vblog.updateArticle}`,
        method: 'post',
        data: data
    })
}

// 删除用户
export function delArticle(data) {
    return request({
        url: `${globalConfig.getAPIPath()}${globalConfig.vblog.delArticle}`,
        method: 'post',
        data: data
    })
}

